﻿<UserControl x:Class="Infrastructure.WpfClient.Controls.MgmtPanelControl"
                xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="100" d:DesignWidth="800"
             x:Name="MgmtPanelControl1" >
    <ToolBar >
        <Button  Name="btnNew" Content="New" Style="{StaticResource ButtonStyle}"
                 Command="{Binding ElementName=MgmtPanelControl1, Path=NewCommand}" 
                 Visibility="{Binding ElementName=MgmtPanelControl1, Path=ShowNew}"
                 Click="Button_Click" Tag="Add"></Button>
        <Button Content="Save" Style="{DynamicResource ButtonStyle}" Command="{Binding ElementName=MgmtPanelControl1, Path=SaveCommand}" Visibility="{Binding ElementName=MgmtPanelControl1, Path=ShowSave}" 
                 Click="Button_Click" Tag="Save"></Button>
        <Button Content="Update" Style="{DynamicResource ButtonStyle}" Command="{Binding ElementName=MgmtPanelControl1, Path=UpdateCommand}" Visibility="{Binding ElementName=MgmtPanelControl1, Path=ShowUpdate}"
                Click="Button_Click" Tag="Update"></Button>
        <Button  Name="btnDelete" Content="Delete" Style="{DynamicResource ButtonStyle}"                  
                 Visibility="{Binding ElementName=MgmtPanelControl1, Path=ShowDelete}"
                 Click="Button_Click" Tag="Delete"></Button>
        <TextBox Name="txtToSearch" Style="{DynamicResource TextBoxStyle}" Visibility="{Binding ElementName=MgmtPanelControl1, Path=ShowSearch}"></TextBox>
        <Button Content="Search" Style="{DynamicResource ButtonStyle}" Command="{Binding ElementName=MgmtPanelControl1, Path=SearchCommand}" CommandParameter="{Binding ElementName=txtToSearch, Path=Text}" Visibility="{Binding ElementName=MgmtPanelControl1, Path=ShowSearch}"></Button>
        <Button Content="Previus" Style="{DynamicResource ButtonStyle}" Command="{Binding ElementName=MgmtPanelControl1, Path=PreviusCommand}" Visibility="{Binding ElementName=MgmtPanelControl1, Path=ShowNavigation}" Name="btnPrevius" Click="btnPrevius_Click"></Button>
        
        <Button Content="Next" Style="{DynamicResource ButtonStyle}" Command="{Binding ElementName=MgmtPanelControl1, Path=NextCommand}" Visibility="{Binding ElementName=MgmtPanelControl1, Path=ShowNavigation}"  Name="btnNext" Click="btnNext_Click"></Button>
        <TextBox Name="txtPosition" IsReadOnly="True" ToolTip="Current Position" Style="{DynamicResource TextBoxStyle}"></TextBox>
        <TextBlock Style="{DynamicResource TextBlockStyle}" Text="Of"></TextBlock>
        <TextBox Name="txtNumberOfItems" IsReadOnly="True" ToolTip="Number of Items" Style="{DynamicResource TextBoxStyle}"></TextBox>
        <Button Name="btnClose"  Style="{DynamicResource ButtonStyle}"  Content="Close" Command="{Binding ElementName=MgmtPanelControl1, Path=CloseCommand}" Visibility="{Binding ElementName=MgmtPanelControl1, Path=ShowClose}"
                Click="Button_Click" Tag="Close"></Button>
    </ToolBar>
</UserControl>
